package com.xiashitech.agent.instrumentation.base.ignoredtypes.commons.inst;

import com.google.auto.service.AutoService;
import com.xiashitech.agent.instrumentation.ignoredtypes.CommonIgnoredTypes;
import io.opentelemetry.javaagent.extension.ignore.IgnoredTypesBuilder;
import io.opentelemetry.javaagent.extension.ignore.IgnoredTypesConfigurer;
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;

@AutoService(IgnoredTypesConfigurer.class)
public class CommonIgnoredTypesConfigurer implements IgnoredTypesConfigurer {

  @Override
  public void configure(IgnoredTypesBuilder builder, ConfigProperties config) {
    CommonIgnoredTypes.ignoredMatch().forEach(builder::ignoreClass);
  }
}
